package com.wangshb.upms.core.spring.security;

import org.springframework.security.core.Authentication;

import java.util.concurrent.ConcurrentHashMap;

public final class SessionManager {

    private final static ConcurrentHashMap map = new ConcurrentHashMap<String, Authentication>();


    public static void put(String tokenId, Authentication authentication) {
        map.put(tokenId, authentication);
    }


    public static Authentication get(String tokenId) {
        return (Authentication)map.get(tokenId);
    }
}
